import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

import "normalize.css";
import "./assets/css/base.css";

import elementPlus from "element-plus";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import "element-plus/dist/index.css";

const app = createApp(App);
app.use(elementPlus);

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

import { formatUtcString } from "./utils/date-format";
app.config.globalProperties.$filter = {
  format(val) {
    return formatUtcString(val);
  },
};

app.use(store);
app.use(router);
app.mount("#app");
